home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Varios Español
/
Varios Español.iso
/
DBWINESP
/
DISK7
/
CBTSAMP.PAK
/
BOTONES.CC
< prev
next >
Wrap
C/C++ Source or Header
|
1994-11-28
|
9KB
|
240 lines
************************************************************************************
* PROGRAMA: Botones.cc
*
* ESCRITO POR: Grupo Borland de ejemplos
*
* FECHA: 2/94
*
* ACTUALIZADO: 6/94
*
* REVISION: $Revisión: 1.51 $
*
* VERSION: dBASE PARA WINDOWS 5.0
*
*
* DESCRIPCION: Archivo de procedimientos que contiene las
* definiciones de clases de los botones más frecuentemente utilizados en
* las fichas de dBASE para Windows. Estos botones contienen bitmaps, que
* están incluidos en <_dbwinhome>\bin\dbas0009.dll, y texto.
* Clases incluidas:
* OkButton
* CloseButton
* CancelButton
* YesButton
* NoButton
* NextButton
* PrevButton
* HelpButton
* InfoButton
* ToolButton
* ReportButton
* BrowseButton
*
* PARAMETROS: Cada botón personalizado de este archivo requiere 2 argumentos:
* F -- Objecto -- Referencia a la ficha padre
* Nombre -- Cadena -- Nombre del control que va a ser creado
* Ejemplo:
* f = new form()
* p = new OkButton(f,"miBotonAceptar")
*
* LLAMADAS: Ninguna
*
* UTILIZACION: SET PROCEDURE TO Botones.cc, then use these classes with:
* Sintaxis con NEW : x = new OkButton(f),
* Sintaxis con DEFINE: define OkButton x of f
* DISEÑADOR DE FICHAS: Seleccione la clase desde el inspector de clases
* personalizadas de DBW al añadir un control a su ficha.
*
* NOTA: Ahora mismo el constructor de cada control ejecuta la función
* MarkCustom(control) para que el control sea correctamente creado durante la
* generación del código, al ser guardado desde el diseñador de fichas.. Esta acción es
* temporal, y será reemplazada con la palabra clave CUSTOM
* en el comando DEFINE <control>.
*******************************************************************************
#include <Dlgsmsgs.h>
*******************************************************************************
*******************************************************************************
class OkButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #20"
this.disabledbitmap = "Resource #21"
this.text = "Aceptar"
endclass
*******************************************************************************
class CloseButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #20"
this.disabledbitmap = "Resource #21"
this.text = "&Cerrar"
this.OnClick = {;form.Close()}
this.StatusMessage = "Cierra esta ficha."
endclass
*******************************************************************************
*******************************************************************************
class CancelButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #28"
this.disabledbitmap = "Resource #29"
this.text = "Cancelar"
this.OnClick = {;form.Close()}
this.StatusMessage = "Cancelar esta ficha"
endclass
*******************************************************************************
*******************************************************************************
class HelpButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #32"
this.disabledbitmap = "Resource #33"
this.text = "Ayuda"
endclass
*******************************************************************************
*******************************************************************************
class YesButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #20"
this.disabledbitmap = "Resource #21"
this.text = "&Sí"
endclass
*******************************************************************************
*******************************************************************************
class NoButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #24"
this.disabledbitmap = "Resource #25"
this.text = "&No"
endclass
*******************************************************************************
*******************************************************************************
class NextButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #100"
this.text = "Sig&uiente"
this.StatusMessage = "Ir al registro siguiente."
****************************************************************************
procedure OnClick
****************************************************************************
skip
if eof()
go bottom
AlertMessage("Ultimo registro.","Advertencia")
endif
endclass
*******************************************************************************
*******************************************************************************
class PrevButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #104"
this.text = "An&terior"
this.StatusMessage = "Ir al registro anterior"
****************************************************************************
procedure OnClick
****************************************************************************
skip - 1
if bof()
go top
AlertMessage("Primer registro.","Advertencia")
endif
endclass
*******************************************************************************
*******************************************************************************
class InfoButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 14.11
this.upbitmap = "Resource #112"
this.text = "&Info"
endclass
*******************************************************************************
*******************************************************************************
class ToolButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.height = 1.50
this.width = 4
this.upbitmap = "Resource #148"
this.text = ""
this.tabstop = .f.
endclass
*******************************************************************************
*******************************************************************************
class ReportButton(f,n) of Pushbutton(f,n) custom
*******************************************************************************
this.UpBitmap = "RESOURCE #614"
this.Text = "Informe"
this.height = 1.50
this.width = 14.11
****************************************************************************
procedure OnClick
****************************************************************************
report form ?
ENDCLASS
*******************************************************************************
*******************************************************************************
CLASS BrowseButton(f,n) of PushButton(f,n) custom
*******************************************************************************
this.UpBitmap = "RESOURCE #610"
this.Text = "Browse"
this.height = 1.50
this.width = 14.11
****************************************************************************
procedure OnClick
****************************************************************************
browse
endclass